import { createApp } from 'vue'
import './style.css'
import App from './App.vue'

import router from './router/index'
import { createPinia } from 'pinia'
import request from './http/index'

import "amfe-flexible/index.js"

//ant-design-vue 组件
import Antd from 'ant-design-vue'
// import 'ant-design-vue/dist/antd.css' 
import 'ant-design-vue/dist/antd.variable.min.css'
import { PlusOutlined, EditOutlined, DeleteOutlined, createFromIconfontCN } from '@ant-design/icons-vue'
import VueFullscreen from 'vue-fullscreen'
import DataVVue3 from '@kjgl77/datav-vue3'
const app = createApp(App)

/**
 * 通过createFromIconfontCN方法参数对象的scriptUrl方式
 */
const iconFont = createFromIconfontCN({
  scriptUrl: '//at.alicdn.com/t/c/font_3727484_rzquerndv0s.js',
})

/**
 * 引用组件
 */
app.use(router)
  .use(Antd)
  .use(createPinia())
  .use(VueFullscreen)
  .use(DataVVue3)

app.config.globalProperties.request = request

//挂载应用 
app.mount('#app')

// app.unmount()

//全局注册常用组件
app.component('PlusOutlined', PlusOutlined)
  .component('EditOutlined', EditOutlined)
  .component('DeleteOutlined', DeleteOutlined)
  .component('iconFont', iconFont)

app.config.unwrapInjectedRef = true


